package org.batatasframework.support.definition.impl;

import org.batatasframework.support.database.metadatas.FieldMetadata;
import org.batatasframework.support.definition.FieldDefinitionSourcable;
import org.batatasframework.support.definition.TableDefinitionResource;

public class DefaultFieldDefinitionResource implements FieldDefinitionSourcable{
	
	protected final TableDefinitionResource sourceTableDefinition;
	protected final FieldMetadata sourceFieldMetadata;
	
	public DefaultFieldDefinitionResource(TableDefinitionResource sourceTableDefinition, FieldMetadata sourceFieldMetadata) {
		this.sourceTableDefinition = sourceTableDefinition;
		this.sourceFieldMetadata = sourceFieldMetadata;
	}
	
	@Override
	public FieldMetadata getSourceField() {
		return sourceFieldMetadata;
	}
	
	@Override
	public TableDefinitionResource getSourceTable() {
		return sourceTableDefinition;
	}
}
